home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / c_toolbx.arc / VIDEO2.C < prev    next >
Encoding:
C/C++ Source or Header  |  1988-03-30  |  1.7 KB  |  49 lines

  1. /*  viedo2.c - basic ROM BIOS calls for Viedo_IO */
  2.  
  3. #include   "stdio.h"
  4. #include   "cminor.h"
  5. #include   "asmtools.h"
  6. #include   "video.h"
  7.  
  8. int vid_clr_scn(from_row,thru_row)      /* clear part/all of screen */
  9.   int   from_row , thru_row  ;          /* top and bottom row to clear */
  10.   {
  11.      vid_up(0,from_row,thru_row) ;      /* special case scroll */
  12.   }
  13.  
  14. int  vid_up(nrows,from_row,thru_row)    /* scroll part/all screen up */
  15.   int   nrows ;                         /* number rows up */
  16.   int   from_row , thru_row ;           /* start and end here */
  17.   {
  18.      REGS  sreg , dreg ;
  19.  
  20.      sreg.ax = nrows ;
  21.      ( (BYTE_REGS *)&sreg) ->bh = NORMAL_DISPLAY ;
  22.      sreg.cx = from_row << 8 ;          /* ch = from_row , cl=0   */
  23.      sreg.dx = (thru_row <<8) | 79 ;    /* dh = thru_row , dl= 79 */
  24.      vidint(V_SCRLUP,&sreg,&dreg) ;
  25.   }
  26.  
  27. int  vid_down(nrows,from_row,thru_row)  /* scroll screen down */
  28.   int   nrows ;                         /* number of rows down */
  29.   int   from_row , thru_row ;           /* start and end here */
  30.   {
  31.      REGS  sreg , dreg ;
  32.  
  33.      sreg.ax = nrows ;
  34.      ( (BYTE_REGS *)&sreg) ->bh = NORMAL_DISPLAY ;
  35.      sreg.cx = from_row << 8 ;          /* ch = from_row , cl = 0  */
  36.      sreg.dx = ( thru_row << 8) | 79 ;  /* dh = thru_row , dl = 79 */
  37.      vidint(V_SCRLDOWN,&sreg,&dreg) ;
  38.   }
  39.  
  40. int vid_blank(n,a)                      /* write n blanks */
  41.   int   n  ;                            /* number blanks to write */
  42.   char  a  ;                            /* use this attribute */
  43.   {
  44.      REGS  sreg , dreg ;
  45.  
  46.      sreg.bx = a & 0xff ;   sreg.ax = ' ' ;  sreg.cx = n  ;
  47.      vidint(V_WCA,&sreg,&dreg) ;
  48.   }
  49.